home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / ip / ka9q / osrc.arc / SESSION.H < prev    next >
Encoding:
C/C++ Source or Header  |  1989-04-05  |  1.4 KB  |  60 lines

  1. #ifndef    NULLSESSION
  2. #include <stdio.h>
  3. #include "global.h"
  4. #include "ftpcli.h"
  5. #include "telnet.h"
  6. #include "icmp.h"
  7. #include "ax25tnc.h"
  8. #include "proc.h"
  9.  
  10.  
  11. /* Session control structure; only one entry is used at a time */
  12. struct session {
  13.     int type;
  14. #define    FREE    0
  15. #define    TELNET    1
  16. #define    FTP    2
  17. #define    AX25TNC    3
  18. #define    FINGER    4
  19. #define    PING    5
  20.     char *name;    /* Name of remote host */
  21.     union {
  22.         struct ftpcli *ftp;
  23.         struct telnet *telnet;
  24.         struct ax25tnc *ax25;
  25.         struct proc *finger;
  26.         struct ping *ping;
  27.     } cb;
  28.     int s;            /* Network socket (control for FTP) */
  29.     struct mbuf *input;    /* Console input */
  30.     FILE *record;        /* Receive record file */
  31.     char *rfile;        /* Record file name */
  32.     FILE *upload;        /* Send file */
  33.     char *ufile;        /* Upload file name */
  34.     int ttymode;        /* Raw or cooked */
  35. };
  36. #define    NULLSESSION    (struct session *)0
  37. extern unsigned Nsessions;
  38. extern struct session *Sessions;
  39. extern struct session *Current;
  40. extern int Mode;
  41. #define    CMD_MODE    1    /* Command mode */
  42. #define    CONV_MODE    2    /* Converse mode */
  43.  
  44. #if    defined(__STDC__) || defined(__TURBOC__)
  45. struct session *sessptr(char *cp);
  46. int go(int argc,char *argv[],struct session *sp);
  47. struct session *newsession(char *name,int type);
  48. void freesession(struct session *sp);
  49. #else
  50. struct session *sessptr();
  51. int go();
  52. struct session *newsession();
  53. void freesession();
  54. #endif
  55. extern int16 Lport;
  56. #define    ALERT_EOF    1
  57.  
  58.  
  59. #endif    /* NULLSESSION */
  60.